package com.iwhalecloud.citybrain.flow.platform.manager.domain.repository;

import com.iwhalecloud.citybrain.flow.platform.manager.common.ResponseResult;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.FlowMessageListVo;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.FlowMessageUpdateStatusVo;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.FlowMessageVo;

/**
 * @author lilh
 * @date 2020/11/30 下午3:17
 */
public interface FlowMessageRepository {

    /**
     * 插入消息
     *
     * @param messageVo 消息内容
     * @return 是否成功
     */
    boolean insertMessage(FlowMessageVo messageVo);

    /**
     * 消息详情
     *
     * @param id 消息id
     * @return 消息详情
     */
    FlowMessageListVo detail(String id);

    /**
     * 消息列表
     *
     * @param messageVo
     * @return 消息列表
     */
    ResponseResult list(FlowMessageVo messageVo);


    /**
     * 更新已读状态
     *
     * @param flowMessageUpdateStatusVo 参数
     * @return 更新的条数
     */
    int updateReadStatus(FlowMessageUpdateStatusVo flowMessageUpdateStatusVo);
}
